package es.udc.pfc.davidparedes.model.receptionist;

import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import es.udc.pfc.davidparedes.model.store.Store;
import es.udc.pfc.davidparedes.model.userprofile.UserProfile;

@Entity
@DiscriminatorValue("Receptionist")
public class Receptionist extends UserProfile {

	private Calendar contractTermination;
	
	public Receptionist() {
	}
	
	public Receptionist(String loginName, String encryptedPassword,
			String firstName, String lastName, String email, String nif,
			Store store, Calendar contractTermination) {
		super(loginName, encryptedPassword, firstName, lastName, email, nif, store);
		this.contractTermination = contractTermination;
	}

	@Column(name = "deletionDate")
	@Temporal(TemporalType.TIMESTAMP)
	public Calendar getContractTermination() {
		return contractTermination;
	}
	
	public void setContractTermination(Calendar contractTermination) {
		this.contractTermination = contractTermination;
	}
	
	@Override
	public String toString() {
		String UserProfileToString = super.toString();
		return (UserProfileToString + "Receptionist [contractTermination=" + contractTermination + "]");
	}
}
